package main

import (
	"fmt"
)

type fruit interface {
	Name()
}

type apple struct {
}
func (a apple)Name(){
	fmt.Println("my name is apple!")
}

type banana struct {
}
func (a banana)Name(){
	fmt.Println("my name is banana!")
}

type origine struct {
}
func (a origine)Name(){
	fmt.Println("my name is origine!")
}

func eat(f fruit){
	f.Name()
}

func a(n int)func()int{
	return func() int {
		return n+1
	}
}

func main1() {
	var b  origine
	b.Name()
	var c banana
	eat(c)
	eat(&apple{})

}
